]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
barLevel: Update cached style values before chaining up
authorFlorian Müllner <fmuellner@gnome.org>
Thu, 20 Jun 2024 12:32:17 +0000 (14:32 +0200)
committerFlorian Müllner <fmuellner@gnome.org>
Thu, 20 Jun 2024 12:45:55 +0000 (14:45 +0200)
St.DrawingArea emits the `repaint` signal on style changes, so
if we chain up first, drawing still happens with the previously
cached values.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3376>

js/ui/barLevel.js

index 3e0f531c6b19add7f675454756d6ebe1ff06d795..ab14952995af9cf5870bb1ac2a555eb88dbc8f11 100644 (file)
@@ -104,8 +104,6 @@ export const BarLevel = GObject.registerClass({
     }
 
     vfunc_style_changed() {
-        super.vfunc_style_changed();
-
         const themeNode = this.get_theme_node();
         this._barLevelHeight = themeNode.get_length('-barlevel-height');
         this._overdriveSeparatorWidth =
@@ -114,6 +112,8 @@ export const BarLevel = GObject.registerClass({
         this._barLevelColor = themeNode.get_color('-barlevel-background-color');
         this._barLevelActiveColor = themeNode.get_color('-barlevel-active-background-color');
         this._barLevelOverdriveColor = themeNode.get_color('-barlevel-overdrive-color');
+
+        super.vfunc_style_changed();
     }
 
     vfunc_repaint() {